| Oracle® OPatch User's Guide Release 12.1 for Windows and UNIX Part Number E39376-01 |
|
|
PDF · Mobi · ePub |
This appendix provides a comprehensive listing and description of all OPatchauto commands.
IMPORTANT:
OPatchauto commands must be run from the GI Home.The OPatchauto commands are run from the GI Home out of the standard OPatch directory. In the following generic example, an OPatchauto command is run from a GI Home.
$GI_HOME/OPatch/opatchauto apply <PATH_TO_PATCH_DIRECTORY>
where <PATH_TO_PATCH_DIRECTORY> is the full path to local staging area where you have downloaded your patches.
OPatchauto consists of five primary command:
You can view online help for any command by specifying the -help or -h option.
For example:
> opatchauto -help > opatchauto -h > opatchauto apply -help > opatchauto resume -help > opatchauto rollback -help > opatchauto version -help
Apply a System Patch to a GI/RAC/DB home. User specified the patch location or the current directory will be taken as the patch location.
Important: OPatchauto must be run from the GI Home as a root user.
<GI_HOME>/OPatch/opatchauto apply
[-analyze]
[-database <database names> ]
[-generateSteps]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ]
[-norestart ]
[-nonrolling ]
[-ocmrf <OCM response file location> ]
[-oh <ORACLE_HOME> ]
[ <Patch Location> ]
The following table describes the options available for the apply command.
Table B-1 apply Command Options
| Option | Description |
|---|---|
|
-analyze |
The |
|
-database |
The |
|
-generateSteps |
The |
|
-invPtrLoc |
The |
|
-norestart |
The |
|
-nonrolling |
The
|
|
-ocmrf |
The |
|
-oh |
The |
|
<patch location> |
The explicit path to the location of the patch. If the patch location is not specified, then the current directory is taken as the patch location. |
Example B-2 Patch Databases Running from RAC Homes Only
<RAC_HOME>/OPatch/opatchauto apply -database db1,db2...dbn
Example B-3 Patch Software-only Installations
<RAC_HOME>/OPatch/opatchauto apply -oh <RAC_HOME>
OR
<GI_HOME>/OPatch/opatchauto apply -oh <GI_HOME>
Table B-2 OPatchauto Command Examples
| Command | Action | Comment |
|---|---|---|
|
|
Patch both GI home and all RAC homes. |
|
|
|
Patch GI home only. |
Local stack can be down. If local stack is down, opatchauto should continue patching.
|
|
|
Patch database db1 and db2 and their associated GI/RAC/DB homes. |
db1 and db2 can run from the same or different GI/RAC/DB homes. Stack has to be up. If not, error out. If there is another db-99 running from the same GI/RAC/DB home as db1,
|
|
|
Patch all targets running out from the given RAC home. |
If there are many RAC homes to patch, just repeat this command many times. Use the |
If opatchauto apply is run and encounters an individual patch within a patch set that cannot be installed, that patch will be skipped and OPatchauto will continue with the installation of the next patch in the sequence.
If opatchauto apply is run and encounters an individual patch that is identical (same patch ID and Unique Patch Identifier (UPI)) to a patch already installed in the GI/RAC/DB home, OPatchauto perform the following based on specific patch conditions:
If the individual patch was created later than the GI/RAC/DB home patch, OPatchauto installs the individual patch.
If the individual patch's creation date is the same as the GI/RAC/DB home patch, OPatchauto will skip installing the individual patch.
If the individual patch was created before the GI/RAC/DB home patch, an error will be generated.
This analyze option simulates an opatchauto apply session by running all prerequisite checks, when possible, without making changes to the system (either bits or configurations). Because the analyze command does not modify the system, it will perform the following checks:
Run SQL sync in analyze mode.
Validate all pre and post processing steps making sure the command is present and executable.
Resume the last OPatchauto session. Currently, it this command can only be used for resuming from Reboot Patching.
Important: OPatchauto must be run from the GI Home as a root user.
<GI_HOME>/OPatch/opatchauto resume [-invPtrLoc <Path to oraInst.loc>]
[-jre <LOC>]
[-oh <ORACLE_HOME>]
[-reboot]
The following table describes the options available for the resume command.
Table B-3 resume Command Options
| Option | Description |
|---|---|
|
-invPtrLoc |
The |
|
-jre |
This |
|
-oh |
The |
|
-reboot |
This option tells opatchauto to resume from the previous halted reboot patching session. |
Roll back the applied System Patch from a GI/RAC/DB home. You must specify the patch location or the current directory will be used as the patch location.
Important: OPatchauto must be run from the GI Home as a root user.
<GI_HOME>/OPatch/opatchauto rollback
[-analyze]
[-database <database names> ]
[-generateSteps]
[-invPtrLoc <Path to oraInst.loc> ]
[-jre <LOC> ]
[-norestart ]
[-nonrolling ]
[-oh <ORACLE_HOME> ]
[ <Patch Location> ]
The following table describes the options available for the rollback command.
Table B-4 rollback Command Options
| Option | Description |
|---|---|
|
-analyze |
This option runs all the required prerequisite checks to confirm the patchability of the system without actually applying the patch or affecting the system in any way. |
|
-database |
The |
|
-generateSteps |
Generate the manual steps that OPatchatuo will perform during the rollback session. |
|
-invPtrLoc |
The |
|
-jre |
This |
|
-norestart |
The |
|
-nonrolling |
The
|
|
-oh |
The |
|
<patch location> |
The explicit path to the location of the patch. If the patch location is not specified, then the current directory is taken as the patch location. |
Example B-4 To roll back a patch on the GI Home and all RAC Homes
<GI_HOME>/OPatch/opatchauto rollback
Print the version of the OPatch utility, dependent OPlan version, and the osysmodel version.
Important: OPatchauto must be run from the GI Home as a root user.
<GI_HOME>/OPatch/opatchauto version [-invPtrLoc <Path to oraInst.loc>]
[-jre <LOC>]
[-oh <ORACLE_HOME>]
[-oui_loc <Custom OUI Location>
[-help] [-h]
The following table describes the options available for the version command.
Table B-5 version Command Options
| Option | Description |
|---|---|
|
-invPtrLoc |
The |
|
-jre |
This |
|
-oh |
The |
|
-oui_loc |
The |